package com.pmonitor.action;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import weibo4j.Weibo;
import weibo4j.http.AccessToken;

import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport implements SessionAware{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8413049214362411247L;
	protected Weibo weibo;
	protected AccessToken accessToken;
	protected Map<String, Object> session;
	
    public void setSession(Map<String, Object> session) {
       this.session = session;
    }
    
	/**
	 * @return isLogin
	 */
	protected boolean isLogin(){
		boolean isLogin = false;
		if(weibo!=null&&accessToken!=null&&accessToken.getAccessToken()!=null){
			isLogin = true;
		}
		return isLogin;
	}
}
